#include <string.h>
#include <array>
#include <iostream>
#include <string>
#include <sstream>
#include <clocale>
#include "ip.h"
#include <list>
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
#include <clocale>
#include <map>

using namespace std;


#pragma once
class ip_simple
{
	map<int,int> v;
public:

	ip_simple()
	{
		
	}

	int TellSize(){
		return v.size();

	}

	void printFirst(){



		cout << v[1];
	
	}

	void ReadFromFile(string in)
	{
		//int ipnr[];
		string str;
		ifstream fin;
		fin.open(in);


		while (std::getline(fin, str))
		{
			istringstream iss(str);
			 int ipnr;

			char t;
			int a, b, c, d, i;

			iss >> a >> t >> b >> t >> c >> t >> d;
			

			ipnr = a * 1000000000 + b * 1000000 + c * 1000 + d;

			 v[ipnr]++;
			/*vector<int> octets;


				// stringstream ss(str);
			string temp;

			while (getline(iss, temp, '.')){
				octets.clear();
				octets.push_back(atoi(temp.c_str()));
				v.emplace_back(octets);*/

			}



			



			//	ArticleRegister ar;
			//ar.ReadFromFile(strRow);
			//if (ar.GetNewsPaper().compare("") != 0) //
			//{
			//	this->push_back(ar);
			//}
		}
	

	/*
	string str = "130.654.123.321";
	istringstream iss(str);
	char t;
	int a, b, c, d;

	iss >> a >> t >> b >> t >> c >> t >> d;
	*/


	~ip_simple()
	{
	}
};

